use OnlineMobileRecharge

go

CREATE PROCEDURE UpdateTopUp
@id_TU int,
@duration int,					
@denominations float,			
@discount int,	
@total float	
AS
	BEGIN
		update TopUp set _duration = @duration,
						 _denominations = @denominations,			
						 _discount = @discount,	
						 _total = @total	
							where id_TU=@id_TU
	END

go

CREATE PROCEDURE DeleteManagementBillTopUp
@id int
AS
	BEGIN
		delete from TopUp where id_TU=@id
	END

go

CREATE PROCEDURE InsertUser
@username nvarchar(11),
@password nvarchar(30),
@serviceType nvarchar(30),
@createdDate datetime,
@name nvarchar(30),
@dateOfBirth datetime,
@gender nvarchar(6),
@address nvarchar(100),
@email nvarchar(100)
AS
	BEGIN
		insert into UserAccount values (@username, @password, @serviceType, @createdDate)
		insert into UserDetails values (@name, @dateOfBirth, @gender, @address, @email)
	END